<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增mater')" />
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-assign-add">
            <input name="materId" type="hidden" id="materId"/>

            <div class="form-group">
                <label class="col-sm-3 control-label">归属项目：</label>
                <div class="col-sm-8">

                    <div class="form-group">
                        <select class="form-control select2-multiple" multiple name="assProgramId">
                            <option th:each="dict : ${sysDepts}" th:text="${dict.deptName}" th:value="${dict.deptId}" th:selected="${dict.selFlag}"></option>
                        </select>
                    </div>

                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/mater"

        $("#materId").val([[${materId}]])

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/saveAssProgram", $('#form-assign-add').serialize());
            }
        }

    </script>
</body>
</html>